home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / jaq / dist / jaquithInt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-11-26  |  3.5 KB  |  98 lines

  1. /*
  2.  * jaquithInt.h --
  3.  *
  4.  *    Declarations for use by the jaquith archive system
  5.  *
  6.  * Copyright 1991 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that this copyright
  10.  * notice appears in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  *
  15.  * Quote:
  16.  *      "Our life is frittered away by detail... Simplify, simplify."
  17.  *      -- Thoreau
  18.  *
  19.  * $Header: /sprite/lib/forms/RCS/jaquithInt.h,v 1.0 91/02/09 13:24:52 mottsmth Exp $ SPRITE (Berkeley)
  20.  */
  21.  
  22. #ifndef _JAQUITHINT
  23. #define _JAQUITHINT
  24.  
  25. #define DEF_DETAIL 0x02
  26. #define DEF_CLIENT 32                 /* cannot exceed FD_SETSIZE */
  27. #define DEF_DEFARCH "default"
  28. #define DEF_CONFIG "config"
  29. #define DEF_CHILDDBG 0
  30. #define DEF_DISKLOW "05"
  31. #define DEF_DISKHIGH "10"
  32. /* Allow UCSB sequoia folks and berkeley folks */
  33. #define DEF_NETMASK "{192.150.216,192.150.186,128.32.*}.*" 
  34. #define DEF_TEST 0
  35.  
  36. #define DEF_DIR_PERM 0755
  37. #define DEF_PERM 0644
  38.  
  39. #define MAXMSGLEN 80
  40. #define DECINTLEN 10
  41.  
  42. #define MAXPORT 65535
  43. /* #define NUMPRIVPORTS IPPORT_RESERVED */ /* for security */
  44. #define NUMPRIVPORTS MAXPORT /* for testing */
  45. #define MAXCLIENT FD_SETSIZE
  46.  
  47. #define NO_SOCKET -1
  48.  
  49. typedef struct Mask {
  50.     int parts[4];
  51. } Mask;
  52.  
  53. typedef struct Parms {
  54.     int logDetail;            /* level of logging detail */
  55.     char *logFile;            /* logfile name */
  56.     int port;                 /* port number where server should listen */
  57.     char *root;               /* root of index tree */
  58.     char *defArch;            /* default logical archive name */
  59.     char *config;             /* configuration file */
  60.     char *getExec;            /* path to get program */
  61.     char *putExec;            /* path to put program */
  62.     char *cleanExec;          /* path to clean program */
  63.     char *statExec;           /* path to status program */
  64.     int childDbg;             /* spawn children with -debug flag */
  65.     char *diskLow;            /* Low % of disk that can be used */
  66.     char *diskHigh;           /* High % of disk that can be used */
  67.     char *netMask;            /* String mask for inet addresses */
  68.     int  fsyncFreq;           /* tell jupdate to fsync every N files */
  69.     int  test;                /* test mode. Local connections only */
  70. } Parms;
  71.  
  72. typedef struct QInfo {
  73.     Q_Handle *qPtr;            /* queue handle */
  74.     char *name;               /* name of archive */
  75.     struct QInfo *link;       /* clients waiting to write this archive */
  76.     struct TClient *activeWriter; /* id of current archive writer */
  77. } QInfo;
  78.  
  79. typedef struct TClient {
  80.     T_ReqMsgHdr hdr;          /* request header */
  81.     char *msgBuf;             /* request body buffer */
  82.     char *msgPtr;             /* working ptr in to message body */
  83.     int msgLen;               /* message body length */
  84.     int socket;               /* socket number */
  85.     int pid;                  /* process id */
  86.     int indx;                 /* slot in client table */
  87.     time_t date;              /* date we accepted client */
  88.     QInfo *archInfo;          /* ptr to archive info */
  89.     char *hostName;           /* client's host name */
  90.     char *archName;           /* logical archive */
  91.     char *mailName;           /* email name for sending responses */
  92.     char *userName;           /* unvalidated user name */
  93.     char *groupName;          /* unvalidated group name */
  94. } TClient;
  95.  
  96. #endif /* _JAQUITHINT */
  97.  
  98.